﻿using DigDes.DSchool.SUPS.DataAccess.Database;
using DigDes.DSchool.SUPS.DataAccess.FileLoaders;
using DigDes.DSchool.SUPS.DataAccess.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DigDes.DSchool.SUPS.BusinessLogic
{
    public class FileLoaderBC
    {
        public void LoadDislocationFile(string filePath)
        {
            var loader = new Dislocation70Loader();

            if (!loader.Check(filePath))
            {
                return;
            }
            List<Dislocation70LoaderDTO> list = new List<Dislocation70LoaderDTO>();

            foreach (var row in loader.Load(filePath))
            {
                FileLoaderDAC.AddOneRow(row);
            }
        }
    }
}

